#pragma once

#ifndef PRESENTATION_H_
#define PRESENTATION_H_

#include <iostream>

#include <gtkmm.h>

#include "IPresentation.h"
#include "MainView.h"


namespace coder
{
	
/*
 * Commented for test + some more
 */	
class Presentation : public IPresentation
{
private:
	Gtk::Main        _kit;
  	MainView         _mainView;
  	
public:

	Presentation(int argc, char **argv)
		:_kit(argc, argv)
	{
	}

	virtual void setEventsHandler(IEventsHandler * eventsHandler)
	{
		_mainView.setEventsHandler(eventsHandler);
	}

	virtual void show()
	{
		_mainView.initialize();
		
		Gtk::Main::run( _mainView );
	}
	
	virtual void setText(const std::string & text)
	{
		_mainView.updateBuffer(text);
	}
	
	virtual void setTitle(const std::string & title)
	{
		_mainView.set_title(title);
	}
	
	virtual std::string getText()
	{
		return _mainView.getBuffer();
	}
};

}
#endif /*PRESENTATION_H_*/
